<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ include file="/WEB-INF/jsp/meta.jsp"%>
<%--
  Created by IntelliJ IDEA.
  User: 82387
  Date: 2018/10/12
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="${ctx}/static/js/jquery.B.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/jquery.PrintArea.js"></script>
</head>
<body>
<div style="width: 100%;margin-top: 10px;">
    <a href="javascript:void(0)" onclick="doDeptPrint()"> 打印</a>
</div>
<div style="width:100%;" id="deptPrint">
    <style type="text/css">
        table {
            border-collapse: collapse;
            table-layout: fixed;
            word-break: break-all;
        }

        table tr {
            height: 25px
        }

        table td {
            border: 0px solid #ff0000;
            border-collapse: collapse;
            font-size: smaller;
        }
    </style>
    <c:if test="${empty wages}">
        未查询到该月工资信息
    </c:if>
    <c:if test="${not empty wages}">
        <div id="base_info" style="width:100%;">
            <div style="text-align: left;margin-bottom: 10px;margin-top: 10px"><h2>${deptName}</h2></div>
            <c:forEach items="${wages}" var="wage" varStatus="status">
                <c:if test="${status.index > 0 and (status.index) mod 12 eq 0 and fn:length(wages)!= (status.index)}">
                    <div style="page-break-after:always; width: 0px;">
                    </div>
                    <div style="text-align: left;margin-bottom: 10px;margin-top: 10px"><h2>${deptName}</h2></div>
                </c:if>
                <table style="width:100%;" frame=above>
                    <tr>
                        <td>月份</td>
                        <td>编号</td>
                        <td>姓名</td>
                        <td>基本工资</td>
                        <td>薪级工资</td>
                        <td>里程补贴</td>
                        <td>误餐补助</td>
                        <td>加班费</td>
                        <td>其他1</td>
                        <td>应发工资</td>
                        <td>社保费</td>
                        <td>公积金</td>
                        <td>缺勤扣发</td>
                        <td>所得税</td>
                        <td>其他2</td>
                        <td>实发工资</td>
                        <td>签字</td>
                    </tr>
                    <tr>
                        <td>${wage.sysDate}</td>
                        <td>${wage.userNum}</td>
                        <td>${wage.userName}</td>
                        <td>${wage.uesrBasicwage}</td>
                        <td>${wage.userSalaryscale}</td>
                        <td>${wage.userMiles}</td>
                        <td>${wage.userMisuse}</td>
                        <td>${wage.userOvertimepay}</td>
                        <td>${wage.userOrther1}</td>
                        <td>${wage.userPayablewage}</td>
                        <td>${wage.userSocialsecurity}</td>
                        <td>${wage.userAccumulation}</td>
                        <td>${wage.userAbsenteeism}</td>
                        <td>${wage.userIncometax}</td>
                        <td>${wage.userOther2}</td>
                        <td>${wage.userNetpayroll}</td>
                        <td></td>
                    </tr>
                </table>
            </c:forEach>
            <h4>本组人数:${fn:length(wages)-1}</h4>
            </h4>
        </div>
    </c:if>
</div>
<script type="text/javascript">
    function doDeptPrint() {
        $("#deptPrint").printArea();
    }
</script>
</body>
</html>
